Mobile Haskell: Compiling Lazy Functional Programs for the Java Virtual Machine

نویسنده

  • David Wakeling
چکیده

This paper shows how lazy functional programs can be made mobile by compiling them for the Java Virtual Machine. The Haskell compiler it describes is based on the h,Gi-machine, which is designed for implementing lazy functional languages on parallel processors. Although this is not the obvious thing to do, it leads to a particularly elegant set of translation rules. Sadly though, the speed of the resulting Java Virtual Machine code programs is disappointing due to the surprisingly high cost of memory allocation/reclamation in current implementations of the Java Virtual Machine. In future work, we intend to nd out whether this high cost is a property of the Java Virtual Machine's design or its implementation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Compiling Lazy Functional Programs Based on the Spineless Tagless G-Machine for the Java Virtual Machine

A systematic method of compiling lazy functional programs based on the Spineless Tagless G-machine (STGM) is presented for the Java Virtual Machine (JVM). A new specification of the STGM, which consists of a compiler and a reduction machine, is presented; the compiler translates a program in the STG language, which is the source language for the STGM, into a program in an intermediate language ...

متن کامل

Implementing Mobile Haskell

Mobile computation enables computations to move between a dynamic set of locations and is becoming an increasingly important paradigm. Mobile Haskell (mHaskell) is an extension of Haskell that supports mobile computation in open distributed systems i.e. dynamically changing systems where multiple executing programs can interact using a predefined protocol. This paper outlines the mHaskell primi...

متن کامل

Efficient Translation of Haskell to Java Master’s Thesis Proposal

The Java Virtual Machine [LY99] is an abstract machine designed to support object oriented languages. The strong security guarantees enforced by the JVM and it‘s portability make it a desirable target for distributing mobile code. Haskell [JHA99] is non-strict, higherorder functional language. Mapping non-strict higher order languages to any stock machine poses many unique challenges [Jon92]. M...

متن کامل

Nhc: a Space-eecient Haskell Compiler

Self-compiling implementations of Haskell, i.e., those written in Haskell, have been and, except one, are still space consuming monsters. Object code size for the compilers themselves are 3-8 Mbyte, and they need 12-20 Mbyte to recompile themselves. One reason for the huge demands for memory is that the main goal for these compilers is to produce fast code. However, the compiler described in th...

متن کامل

An Abstract Machine for Curry and Its Concurrent Implementation in Java

Curry is a multi-paradigm declarative language aiming to amalgamate functional, logic, and concurrent programming paradigms. Curry combines in a seamless way features from functional programming and (concurrent) logic programming. Curry’s operational semantics is based on the combination of lazy reduction of expressions together with a possibly non-deterministic binding of free variables occurr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • J. Funct. Program.

دوره 9  شماره 

صفحات  -

تاریخ انتشار 1998